#include "Employee.h"
#include <cstring>
Employee::Employee()
{
	name=new char[20];
	strcpy(name,"F**K THE C++");
}
Employee::Employee(const char *n)
{
	 int l=strlen(n);
	 name = new char[l];
	 strcpy(name,n);
}
Employee::Employee(const char *n, struct Emp_n t_n, struct Emp_d t_d)
{
	 int l=strlen(n);
	 name = new char[l];
	 strcpy(name,n);
	 number = t_n;
	 date = t_d;
}
void Employee::setInformation(const char *n, struct Emp_n t_n, struct Emp_d t_d)
{
	 int l=strlen(n);
	 name = new char[l];
	 strcpy(name,n);
	 number = t_n;
	 date = t_d;
}
void Employee::getInformation()
{
	std::cout<<"name:"<<name<<std::endl;
	std::cout<<"number:"<<number.num<<"-"<<number.ch<<std::endl;
	std::cout<<"date:"<<date.year<<"."<<date.month<<"."<<date.day<<std::endl;
}
Employee::~Employee()
{
	delete []name;
}